<style type="text/css">
#listimg a{margin:0px 10px 10px 0px}
#listimg a:hover{padding-left:15px;margin:0px;background:url(<?php echo base_url(); ?>public/admin/images/del.gif) no-repeat 0px 50%;}
#listimg a:hover img{border:1px solid #F00}
td.borbot{border-bottom:1px solid #CCC}
td.padtop{padding-top:10px}
</style>
<script  type="text/javascript" src="<?php echo base_url();?>public/admin/scripts/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#listimg a").click(function(){
		if(confirm('Do you want to delete ?')){
			id = $(this).attr("name");
			$(this).fadeOut();
			jQuery.post("<?php echo base_url();?>agency/album/del",{id:id},function(result){});
		}
	});
	$("#okie").click(function(){
		$file = $("#file").val();
		if($file == ""){
			alert("Please select a file");
			return false;
		}
	});
});
</script>
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="26" class="borbot" style="color:#F30">Add new</td>
    <td class="borbot padtop">
    	<form action="<?php echo base_url();?>agency/album/doupload" method="post" enctype="multipart/form-data">
        	<input type="file" name="file" id="file" size="25" />
            <input type="hidden" name="album" value="<?php echo $albumid; ?>" />
          <input type="submit" id="okie" name="okie" value="Upload" />
      </form>
    </td>
  </tr>
  <tr>
    <td height="26" colspan="2" style="font-size:13px">For the best photo quality, we highly appreciate you to submit photos with the size of 470 x 270 pixels</td>
  </tr>
  <tr>
    <td colspan="2" id="listimg" class="padtop">
    	<?php if(isset($listimg)){ foreach($listimg as $image){ ?>
      		<a href="javascript:void(0)" name="<?php echo $image['gallery_id']; ?>"><img src="<?php echo base_url()."uploads/albums/gallerys/thumb/".$image['gallery_image']; ?>" width="100" /></a>
        <?php } } ?>
    </td>
  </tr>
</table>